package com.xd.auth.api.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xd.common.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
    * 更新token储存
    */
@ApiModel(value="com-xd-auth-api-model-OauthRefreshToken")
@Data
@TableName(value = "oauth_refresh_token")
public class OauthRefreshToken  implements Serializable {
    private static final long serialVersionUID = 2126522077927998350L;
    /**
     * 该字段的值是将refresh_token的值通过MD5加密后存储的.
     */
    @TableField(value = "token_id")
    @ApiModelProperty(value="该字段的值是将refresh_token的值通过MD5加密后存储的.")
    private String tokenId;

    /**
     * 存储将OAuth2RefreshToken.java对象序列化后的二进制数据.
     */
    @TableField(value = "token")
    @ApiModelProperty(value="存储将OAuth2RefreshToken.java对象序列化后的二进制数据.")
    private byte[] token;

    /**
     * 存储将OAuth2Authentication.java对象序列化后的二进制数据.
     */
    @TableField(value = "authentication")
    @ApiModelProperty(value="存储将OAuth2Authentication.java对象序列化后的二进制数据.")
    private byte[] authentication;

    public static final String COL_TOKEN_ID = "token_id";

    public static final String COL_TOKEN = "token";

    public static final String COL_AUTHENTICATION = "authentication";
}
